package com.cnbbx.mybatis.mysql;


import com.cnbbx.mybatis.PageData;
import com.cnbbx.mybatis.query.builder.DeleteBuilder;
import com.cnbbx.mybatis.query.builder.InsertBuilder;
import com.cnbbx.mybatis.query.builder.QueryBuilder;
import com.cnbbx.mybatis.query.builder.UpdateBuilder;

import java.util.List;

public interface MySqlBaseDao<T> {
    int update(UpdateBuilder updateBuilder);

    int insert(InsertBuilder insertBuilder);

    int delete(DeleteBuilder deleteBuilder);

    int count(QueryBuilder queryBuilder);

    List<T> list(QueryBuilder queryBuilder);

    T one(QueryBuilder queryBuilder);

    <K> K sum(QueryBuilder queryBuilder);

    PageData page(QueryBuilder queryBuilder);
}
